CentOS 6
Sponsored Link

OpenStack Icehouse : Configure Swift#1 (Control Node)
2014/06/28
 
Configure OpenStack Object Storage (Swift).
This example shows to configure like the environment below.
                                    |
     +------------------+           |           +-----------------+
     | [ Control Node ] |10.0.0.30  |  10.0.0.70|  [ Proxy Node ] |
     |     Keystone     |-----------+-----------|                 |
     +------------------+           |           +-----------------+
                                    |
        +---------------------------+--------------------------+
        |                           |                          |
        |10.0.0.71                  |10.0.0.72                 |10.0.0.73 
+-------+----------+       +--------+---------+       +--------+---------+
| [Storage Node#1] |       | [Storage Node#2] |       | [Storage Node#3] |
|                  |-------|                  |-------|                  |
+------------------+       +------------------+       +------------------+

[1] Add Swift user or service on Keystone Server (Control Node) first.
# add swift user

[root@dlp ~(keystone)]#
keystone user-create --tenant service --name swift --pass servicepassword --enabled true

+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|  email   |                                  |
| enabled  |               True               |
|    id    | 5d9e8de67da2473cb568df416a8da4eb |
|   name   |              swift               |
| tenantId | 4f7318775d01409e98f12f210a0f1f31 |
| username |              swift               |
+----------+----------------------------------+

# add swift user in admin role

[root@dlp ~(keystone)]#
keystone user-role-add --user swift --tenant service --role admin
# add an entry for swift service

[root@dlp ~(keystone)]#
keystone service-create --name=swift --type=object-store --description="Swift Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |          Swift Service           |
|   enabled   |               True               |
|      id     | 6f847f5c25424d489e886c60d73903a8 |
|     name    |              swift               |
|     type    |           object-store           |
+-------------+----------------------------------+

# define the IP address for Proxy Node

[root@dlp ~(keystone)]#
export proxy_host=10.0.0.70
# add an entry for swift endpoint

[root@dlp ~(keystone)]#
keystone endpoint-create --region RegionOne \
--service swift \
--publicurl "http://$proxy_host:8080/v1/AUTH_\$(tenant_id)s" \
--internalurl "http://$proxy_host:8080/v1/AUTH_\$(tenant_id)s" \
--adminurl "http://$proxy_host:8080/v1"

+-------------+---------------------------------------------+
|   Property  |                    Value                    |
+-------------+---------------------------------------------+
|   adminurl  |           http://10.0.0.70:8080/v1          |
|      id     |       547c93487be2483aaab76fdd0af6ac23      |
| internalurl | http://10.0.0.70:8080/v1/AUTH_$(tenant_id)s |
|  publicurl  | http://10.0.0.70:8080/v1/AUTH_$(tenant_id)s |
|    region   |                  RegionOne                  |
|  service_id |       6f847f5c25424d489e886c60d73903a8      |
+-------------+---------------------------------------------+
 
Tweet